1. Field of the Invention
The present invention relates to technology that checks data that was written on a disk, and more particularly to an apparatus and method for detecting disk write omissions that accurately detect write omissions on a disk.
2. Description of the Related Art
Conventionally, when checking data to ensure that the data is written on a disk (or a magnetic disk), a check code is established for each block that is an I/O (Input/Output) unit to the disk, and this check code is used to ensure that the data is written accurately.
FIG. 19 illustrates an example of the format of one block. In the format example shown in FIG. 19, 8 bytes containing a BCC (Block Check Code) as a check code to detect errors is added to data of 512 bytes, to form 1 block of 520 bytes.
In this connection, Japanese Patent Laid-Open No. 10-171608 discloses a magnetic disc array and a data checking method used in a magnetic disc array.
When updating data on a disk in accordance with a data write request from a host computer, in some cases an area for which writing was requested is not actually updated.
Here, the term “disk write omission” refers to a case in which updating was not actually performed for a particular area and the old data remains as it was in that area even though the disk returns a reply to the effect that the area for which writing was requested was updated with the new data in response to a data write request from the host computer.
When a disk write omission occurs in one part of one block, for example, as in a case in which the first 4 bytes of the 512 bytes of data within the one block shown in FIG. 19 was not updated, the relation between the BCC and the data breaks down. Accordingly, in this case, a disk write omission can be detected by the conventional technology that conducts a data check using the BCC.
However, when a disk write omission occurs for the entire area of the one block the old data will remain in the entire area of the one block of FIG. 19. In this case, the relation between the BCC and the data is maintained as the old one block. Accordingly, there is a problem that this disk write omission cannot be detected by the conventional technology that conducts a data check using the BCC.
The write omission on a disk also raises a problem, for example, when upon reception of a data write request from a host computer, a disk control system stores update data in a cache memory within a system on a temporary basis, and then writes back the update data in the cache memory on the disk. It is necessary to examine whether a write omission on a disk occurred before update data in the cache memory is written back on the disk.
Further, the write omission on a disk also raises a problem, for example, when the disk control system stages data in the disk on a cache memory. It is also necessary to examine whether a write omission on a disk occurred to check the correctness of staging of data when data in the disk is staged on the cache memory.
Further, an object of the technology disclosed in the Japanese Patent Laid-Open No. 10-171608 is to detect in which data read from which address of which magnetic disk unit among a plurality of magnetic disk units an error exists, and it does not attempt to accurately detect a disk write omission that occurred in the entire area of one block.